Draft
Conversation
seunlanlege
reviewed
Oct 9, 2025
seunlanlege
reviewed
Oct 9, 2025
seunlanlege
reviewed
Oct 9, 2025
seunlanlege
reviewed
Oct 9, 2025
Member
|
Looks like a great start, lets get tests |
seunlanlege
reviewed
Jan 27, 2026
seunlanlege
reviewed
Jan 27, 2026
seunlanlege
reviewed
Jan 27, 2026
seunlanlege
reviewed
Jan 27, 2026
…/beefy-consensus-client # Conflicts: # Cargo.toml # modules/pallets/testsuite/Cargo.toml # modules/pallets/testsuite/src/runtime.rs
verify fraud proof fix tests
seunlanlege
reviewed
Feb 23, 2026
| type Hash = [u8; 32]; | ||
|
|
||
| fn hash(data: &[u8]) -> Self::Hash { | ||
| keccak256(data) |
Member
There was a problem hiding this comment.
i think this should be generic
seunlanlege
reviewed
Feb 23, 2026
| let mut data = [0u8; 64]; | ||
| data[..32].copy_from_slice(left); | ||
| data[32..].copy_from_slice(right); | ||
| Ok(keccak256(&data)) |
seunlanlege
reviewed
Feb 23, 2026
Comment on lines
+79
to
+80
| let (state, heads_root) = verify_mmr_update_proof::<H>(trusted_state, proof.relay)?; | ||
| Ok((state.encode(), heads_root)) |
Member
There was a problem hiding this comment.
missing parachain header verification
seunlanlege
reviewed
Feb 23, 2026
Comment on lines
+137
to
+144
| println!("\n======= VERIFIER DEBUG ======="); | ||
| let target_root = if is_current_authorities { | ||
| trusted_state.current_authorities.keyset_commitment | ||
| } else { | ||
| trusted_state.next_authorities.keyset_commitment | ||
| }; | ||
| println!("Target Merkle Root: {:?}", H256::from(target_root)); | ||
| println!("Verifier-side calculated authority leaf hashes:"); |
seunlanlege
reviewed
Feb 23, 2026
Comment on lines
+149
to
+154
| let k256_sig = K256Signature::from_slice(&sig.signature[0..64]) | ||
| .map_err(|_| Error::InvalidSignatureFormat)?; | ||
|
|
||
| let recovered_verifying_key = | ||
| VerifyingKey::recover_from_prehash(commitment_hash.as_ref(), &k256_sig, recovery_id) | ||
| .map_err(|_| Error::FailedToRecoverPublicKey)?; |
seunlanlege
reviewed
Feb 23, 2026
Comment on lines
+126
to
+131
| if !Parachains::<T>::contains_key(para_header.para_id) { | ||
| Err(Error::Custom(format!( | ||
| "Parachain with id {} not registered", | ||
| para_header.para_id | ||
| )))? | ||
| } |
Member
There was a problem hiding this comment.
also why are we using ismp_parachain storage?
verify parachain headers
…/beefy-consensus-client # Conflicts: # modules/pallets/testsuite/Cargo.toml
…/beefy-consensus-client
…/beefy-consensus-client # Conflicts: # Cargo.lock # modules/pallets/testsuite/src/runtime.rs # parachain/runtimes/gargantua/src/ismp.rs
seunlanlege
reviewed
Apr 6, 2026
Comment on lines
+242
to
+248
| #[derive(Encode)] | ||
| struct CanonicalMmrLeaf { | ||
| version: MmrLeafVersion, | ||
| parent_number_and_hash: (u32, H256), | ||
| beefy_next_authority_set: BeefyAuthoritySet<H256>, | ||
| leaf_extra: H256, | ||
| } |
Member
There was a problem hiding this comment.
isn't this in substrate already?
seunlanlege
reviewed
Apr 6, 2026
Member
There was a problem hiding this comment.
i don't know if we need this, since we simply use the client in the outbound proofs pallet
seunlanlege
reviewed
Apr 6, 2026
Comment on lines
+144
to
+145
| /// The k-index of the leaf, used in MMR calculations. | ||
| pub k_index: u32, |
seunlanlege
reviewed
Apr 6, 2026
| Ok((new_state.encode(), verified_headers)) | ||
| } | ||
|
|
||
| fn build_sp1_public_inputs<H: Keccak256>( |
Member
There was a problem hiding this comment.
why not use alloy sol! macro?
seunlanlege
reviewed
Apr 6, 2026
| pub parachains: Vec<ParachainHeader>, | ||
|
|
||
| /// Proof for parachain header inclusion in the parachain headers root | ||
| pub proof: Vec<Vec<(usize, [u8; 32])>>, |
Member
There was a problem hiding this comment.
This type is used in solidity
Member
|
Oh i think we want to keep the ismp beefy client, just not the pallet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces the ismp-beefy pallet, a consensus client for ISMP designed to verify Polkadot's BEEFY finality proofs. This implementation allows ISMP to process consensus updates from BEEFY, making it possible to trustlessly verify state commitments.